angular.module('myApp.view1', ['ui.router','myApp.version'])
.config(function($stateProvider) {
  $stateProvider.state({
      name : 'view1',
      url:'/view1',
      templateUrl:'views/view1/view1.html',
      controller:'View1Ctrl'
  });
})
.controller('View1Ctrl',function() {
    kindEditorInit();
});

//初始化富文本编辑器
var kindEditorInit = function () {
    window.editor = KindEditor.create('#container', {
        filterMode : false,
        resizeType : 0,
        minHeight : '380px',
        autoHeightMode: true,
        newlineTag:'br',
        items : [
            'source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste',
            'plainpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', '|', 'fullscreen','formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'table', 'hr', 'baidumap', 'pagebreak',
            'link', 'template','preview'
        ]
    });
    var minHeight = 350;
    $('.ke-container .ke-edit,.ke-container .ke-edit-iframe').css({'height':minHeight + 37,'min-height':minHeight});
};